package com.chb.microservice.provider.feign;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.cbh.api.model.ApiResult;
import com.chb.microservice.provider.model.PlatePrefix;

import io.swagger.annotations.ApiParam;

@FeignClient(name = "cbh-general-rest")
public interface PlatePrefixFeignClient {

	/**
	 * 保存车牌前缀信息
	 * 
	 * @param product
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/plate/prefix", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save(
			@ApiParam(value = "车牌前缀信息", required = true) @RequestBody(required = true) PlatePrefix ob) ;

	/**
	 * 获取全部车牌前缀信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/plate/prefix", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<PlatePrefix>> getAll();

	/**
	 * 获取车牌前缀信息
	 * 
	 * @param proId
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/plate/prefix/{id}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<PlatePrefix> getOne(@PathVariable("id") String id) ;

	/**
	 * 删除车牌前缀信息
	 * 
	 * @param proId
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/plate/prefix/{id}", method = RequestMethod.DELETE, produces = "application/json")
	public ApiResult<Boolean> delete(@PathVariable("id") String id);
}
